import request from '@/utils/request'

// 作品导出接口
export function getMyPaperList(data) {
  return request({
    url: '/work/export',
    method: 'post',
    data
  })
}

// 作品分页查询接口
export function getUserWorks(data) {
  return request({
    url: '/work/UserGetRelateWork',
    method: 'post',
    data
  })
}

export function thesis_add(data) {
  return request({
    url: '/work/addWork',
    method: 'post',
    data
  })
}

export function thesis_add2(data) {
  return request({
    url: '/work/updateWork',
    method: 'post',
    data
  })
}

export function thesis_delete(ID) {
  return request({
    url: '/work/DeleteWork',
    method: 'get',
    params: { ID }
  })
}

export function thesis_commit(id) {
  return request({
    url: '/work/ReCommitWork',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_author(id) {
  return request({
    url: '/workauthor/selectauthor',
    method: 'get',
    params: { id }
  })
}

export function thesis_author_add(data) {
  return request({
    url: '/workauthor/addauthor',
    method: 'post',
    data
  })
}

export function thesis_author_edit(data) {
  return request({
    url: '/workauthor/updateauthor',
    method: 'post',
    data
  })
}

export function thesis_author_delete(id) {
  return request({
    url: '/workauthor/deleteauthor',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_project(workID) {
  return request({
    url: '/workproject/GetWorkProjectByWorkID',
    method: 'get',
    params: { workID }
  })
}
export function thesis_project_add(data) {
  return request({
    url: '/workproject/AddWorkProject',
    method: 'post',
    data
  })
}

export function thesis_project_edit(data) {
  return request({
    url: '/workproject/UpdateWorkProject',
    method: 'post',
    data
  })
}

export function thesis_project_delete(workProjectID) {
  return request({
    url: '/workproject/RemoveWorkProject',
    method: 'get',
    params: { workProjectID }
  })
}

// 院级审核
export function get_thesis_yuanji(data) {
  return request({
    url: '/work/CollegeUserGetWork',
    method: 'post',
    data
  })
}

export function thesis_pass_yuanji(PID) {
  return request({
    url: '/work/CollegeCheckPass',
    method: 'get',
    params: { PID }
  })
}

export function thesis_back_yuanji(data) {
  return request({
    url: '/work/CollegeCheckBack',
    method: 'post',
    data
  })
}

// 校级审核
export function get_thesis_xiaoji(data) {
  return request({
    url: '/work/SchoolUserGetwork',
    method: 'post',
    data
  })
}

export function thesis_pass_xiaoji(PID) {
  return request({
    url: '/work/SchoolCheckPass',
    method: 'get',
    params: { PID }
  })
}

export function thesis_back_xiaoji(data) {
  return request({
    url: '/work/SchoolCheckBack',
    method: 'post',
    data
  })
}

export function thesis_author_edit_xiaoji(data) {
  return request({
    url: '/workauthor/upWorkAuthor',
    method: 'post',
    data
  })
}

export function update_thesis_source(data) {
  return request({
    url: '/workqulification/upWorkScore',
    method: 'post',
    data
  })
}

// 附件
export function file_add(data) {
  return request({
    url: '/work/addworkfile',
    method: 'post',
    data
  })
}

export function get_file(id) {
  return request({
    url: '/work/pageworkfileCondition',
    method: 'get',
    params: { id }
  })
}

export function file_delete(id) {
  return request({
    url: '/work/Deleteworkfile',
    method: 'get',
    params: { id }
  })
}

// 量化
export function getCascadingData(params) {
  return request({
    url: '/worktype/getCascadingData',
    method: 'get',
    params
  })
}

export function getQulification(WorkID) {
  return request({
    url: '/workqulification/getWorkQulification',
    method: 'get',
    params: { WorkID }
  })
}

export function deleteQulification(ID) {
  return request({
    url: '/workqulification/deleteWorkQulification',
    method: 'get',
    params: { ID }
  })
}

export function addQulification(data) {
  return request({
    url: '/workqulification/addWorkQulification',
    method: 'post',
    data
  })
}

export function GetWorkDTOById(ID) {
  return request({
    url: '/work/GetWorkDTOById',
    method: 'get',
    params: { ID }
  })
}

// 撤回著作
export function thesis_withdraw(id) {
  return request({
    url: '/work/WithdrawWork',
    method: 'get',
    params: { id }
  })
}
